<?php include_partial("default/tab", array('navbars' => $navbars)) ?>
<?php include_partial("default/submenu", array('submenus' => $submenus)) ?>
<div id="vtns_body" class="clearfix">
	<div class="container-fluid">
	  <div class="row-fluid">
		<div class="span9">
			<!--BEGIN Body content-->
            <?php include_partial("default/applyForm", array('formVariables' => $formVariables)); ?>
            
            <div class="row-fluid">
                <div class="span12">
                    <div class="box gradient vtns-box-blue">
                <?php
                foreach ($homeCmsCategoryDefault as $homeCmsCategory)
                {
                    if (++$index == 1) {
                    ?>
                        <div class="title">
                            <h4><?php echo $homeCmsCategory['name']?></h4>
                        </div>
                        <div class="content" style="position:relative;">
                    <?
                    }
                    $homeCmsList = $homeCmsCategory['cms_array'];
                    foreach ($homeCmsList as $homeCms)
                    {
                    ?>
                        <div class="row-fluid">
                            <?php echo htmlspecialchars_decode($homeCms['content']); ?>
                        </div>
                        <div class="marginT10"></div>
                    <?
                    }
                }
                ?>
                        </div>
                    </div>
                </div>
            </div>
			<?php
			
            $cnt = 0;
            foreach ($homeCmsCategoryList as $homeCmsCategory)
            {
                $cnt ++;
                if ($cnt % 2 == 1) 
                    echo '<div class="row-fluid">';
            ?>
            <div class="span6">
                <div class="box gradient">
                    <div class="title">
                        <h4><?php echo $homeCmsCategory['name']?></h4>
                    </div>
                    <div class="content" style="position:relative;">
                        <?php
                        $homeCmsList = $homeCmsCategory['cms_array'];
                        if (count($homeCmsList) > 1) {
                            echo "<ul class='arrow arrow-blue'>";
                            $count = 0;
                            foreach ($homeCmsList as $homeCms)
                            {
                                if ((++ $count) < 8)
                                {
                            ?>
                                <li><a href="<?php echo url_for('cms/permalink?cms_category_id='.$homeCmsCategory['cms_category_id'].'&cms_id='.$homeCms['cms_id'].'-'.vtnsSEO::getPermalink($homeCms['name'])) ?>"><?=$homeCms['name']?></a></li>
                            <?
                                }
                            }
                            echo "</ul>";
                        } else if (count($homeCmsList) > 0) {
                            echo htmlspecialchars_decode($homeCmsList[0]['content']);
                        }
                        ?>
                    </div>
                </div>
            </div>
            <?
                if ($cnt % 2 == 0) 
                    echo '</div>';
            }
            ?>
                <div class="span6">
                    <div class="box gradient">
                        <div class="title">
                            <h4>Frequently Asked Questions</h4>
                        </div>
                        <div class="content" style="position:relative;">
                            <?php
                            if (count($faqs) > 1) {
                                echo "<ul class='arrow arrow-blue'>";
                                $count = 0;
                                foreach ($faqs as $faq)
                                {
                                    if ((++ $count) < 8)
                                    {
                                ?>
                                    <li><a href="<?php echo url_for('cms/permalink?cms_category_id='.($faq_category->cms_category_id).'&cms_id='.$faq['cms_id'].'-'.vtnsSEO::getPermalink($faq['name'])) ?>"><?=$faq['name']?></a></li>
                                <?
                                    }
                                }
                                echo "</ul>";
                            } else if (count($faqs) > 0) {
                                echo htmlspecialchars_decode($faqs[0]['content']);
                            }
                            ?>
                            <div class="pull-right">
                            	<a href="<?php echo url_for('cms/permalink?cms_category_id='.($faq_category->cms_category_id).'-'.vtnsSEO::getPermalink($faq_category->name))?>">More FAQs</a>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--END Body content-->
		</div>
		<?php include_partial("default/rightHook", array('rightBlocks' => $rightBlocks)); ?>
	  </div>
	</div>
</div>
<?php include_partial("default/menuBottom", array('menuBottoms' => $menuBottoms)); ?>
<?php include_partial("default/bottom", array('bottom' => $bottom)); ?>